#define _GUN_SOURCE
#include "pthread.h"
#include <stdio.h>

void *thread_func1(void *arg){
    printf("Hello, I'm a thread1!\n");
}
void *thread_func2(void *arg){
    printf("Hello, I'm a thread2!\n");
}
int main(int argc, char const *argv[])
{
    pthread_t pt1;
    pthread_t pt2;
    if (pthread_create(&pt1, NULL, thread_func1, NULL) != 0)
    {
        printf("Create thread failed!\n");
    }
    if (pthread_create(&pt2, NULL, thread_func2, NULL) != 0)
    {
        printf("Create thread failed!\n");
    }
    pthread_join(pt1, NULL);
    pthread_join(pt2, NULL);
    printf("Hello, I'm the main thread!\n");
    
    return 0;
}
